package com.chenjinyan.dao;

import com.chenjinyan.entity.MessageEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;

/**
 * @author chenjinyan
 * @version 1.0
 */
@Repository
public interface MessageRepository extends JpaRepository<MessageEntity, Long> {
    @Override
    @Modifying
    @Transactional
    MessageEntity saveAndFlush(MessageEntity messageEntity);
}
